package com.demo.reduction;

import com.demo.common.Dish;
import com.demo.common.DishUtil;

import java.util.List;

public class Test {
    public static void main(String[] args) {
        List<Dish> menu = DishUtil.getDishes();
        int count = menu.stream()
                         .map(d -> 1)
                         .reduce(0, (a, b) -> a + b);
        System.out.println(count);
    }
}
